package io.api.modules.project.service;

import io.admin.common.page.PageData;
import io.admin.common.service.CrudService;
import io.api.modules.project.dto.LineDTO;
import io.api.modules.project.dto.UserLineDTO;
import io.api.modules.project.entity.LineEntity;

import java.util.List;
import java.util.Map;

/**
 * 项目线路关系表
 *
 * @author Mark sunlightcs@gmail.com
 * @since 1.0.0 2024-07-12
 */
public interface LineService extends CrudService<LineEntity, LineDTO> {

    List<LineDTO> list(Long projectId);
    /**
     * 判断线路是否已存在
     * @param name 线路名称
     * @param projectId 项目ID
     * @return int
     */
    int countByNameAndProjectId(String name, Long projectId, Long lineId);

    PageData<UserLineDTO> pageLine(Map<String, Object> params);

    List<LineDTO> selectList(Map<String, Object> params);
}